<?php 
	// contoh Traffic Light
	
	function trafficlight($lampu){
		
		if ($lampu == 'merah')
		{
			$tanda = 'berhenti';
		}
		
		elseif($lampu == 'kuning')
		{
			$tanda = 'hati-hati';
		}
		
		elseif($lampu == 'hijau')
		{
			$tanda = 'boleh jalan';
		}
		
		else {
			$tanda = 'whatever';	
		}
		
		return $tanda;
	}

	echo  trafficlight('hijau') ;
	
	
?>